<?php
/**
 * ImpSoft User Row Model
 * If the user's row object should have any special functionality, it goes in
 * here. Usually the bulk of the model code will go in the table, not the row
 * 
 * @package ImpSoft
 * @subpackage ImpSoft Models
 * @copyright Luke Visinoni (luke.visinoni@gmail.com)
 * @author Luke Visinoni (luke.visinoni@gmail.com)
 * @license GNU Lesser General Public License
 */
class UserRow extends ImpSoft_Db_Table_Row {

    public function setPassword($newpassword = null) {
    
        if (is_null($newpassword)) {
            $newpassword = User::generatePassword();
        }
        $this->password = User::hash($newpassword);
        return $newpassword;
    
    }

}